package cn.ickck.law_paper_final.service.Impl;

import cn.ickck.law_paper_final.mapper.HouseLoanMapper;
import cn.ickck.law_paper_final.model.entity.HouseLoan;
import cn.ickck.law_paper_final.service.HouseLoanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ck
 * @Description:
 * @Date: Create in 19:42 2020/10/14
 */
@Service
public class HouseLoanServiceImpl implements HouseLoanService {
    @Autowired
    private HouseLoanMapper houseLoanMapper;
    @Override
    public List<HouseLoan> findAll() {
        return houseLoanMapper.findAll();
    }

    @Override
    public int count() {
        return houseLoanMapper.count();
    }

    @Override
    public List<HouseLoan> selectByPage(int start, int end) {
        return houseLoanMapper.selectByPage(start,end);
    }

    @Override
    public Integer deleteById(Integer id) {
        return houseLoanMapper.deleteById(id);
    }

    @Override
    public Integer insert(HouseLoan houseLoan) {
        return houseLoanMapper.insert(houseLoan);
    }

    @Override
    public Integer update(HouseLoan houseLoan) {
        return houseLoanMapper.update(houseLoan);
    }

    @Override
    public List<HouseLoan> selectByNameOrKey(String key) {
        return houseLoanMapper.selectByNameOrKey(key);
    }


    @Override
    public void deleteByKey(String key) {
        houseLoanMapper.deleteByKey(key);
    }
}
